;SLIDE Text Library 

 INCLUDE "libraries.inc"

 CreateLibrary Text,LargeText,SmallNum,SmallText,LargeNum,LargeChar,SmallChar


 IFDEF __LargeChar
 IFNDEF __SmallChar
 DEFINE __SmallChar
 ENDIF
_LargeChar_:
       set    fracDrawLFont,(iy+fontFlags)
 ENDIF

 IFDEF __SmallChar
_SmallChar_:
       call   LoadCoords
       ld     a,(hl)
       call   ConvVal8Bit
       call   SaveTextStuff
       set    textWrite,(iy+sGrFlags)
       B_CALL VPutMap
       call   RestoreTextStuff
       res    textWrite,(iy+sGrFlags)
       B_CALL VPutMap
       res    fracDrawLFont,(iy+fontFlags)
       ret
 ENDIF

 IFDEF __LargeText
 IFNDEF __SmallText
 DEFINE __SmallText
 ENDIF
_LargeText_:
       set    fracDrawLFont,(iy+fontFlags)
 ENDIF

 IFDEF __SmallText
_SmallText_:
       call   LoadCoords
       B_CALL LdHLInd
       bit    7,h
       jr     z,SmallTextNoWhit
       set    textInverse,(iy+textFlags)
       res    7,h
SmallTextNoWhit:
       call   SaveTextStuff
       set    textWrite,(iy+sGrFlags)
       call   VPutSApp
       call   RestoreTextStuff
       res    textWrite,(iy+sGrFlags)
       call   VPutSApp
       res    textInverse,(iy+textFlags)
       res    fracDrawLFont,(iy+fontFlags)
       ret

 ENDIF

 
 IFDEF __LargeNum
 IFNDEF __SmallNum
 DEFINE __SmallNum
 ENDIF
_LargeNum_:
       set    fracDrawLFont,(iy+fontFlags)
 ENDIF

 IFDEF __SmallNum
_SmallNum_:
       call   LoadCoords
       call   LdHLIndConvVal
       B_CALL SetXXXXOP2
       B_CALL OP2ToOP1
       ld     a,5
       call   SaveTextStuff
       set    textWrite,(iy+sGrFlags)
       B_CALL DispOP1A
       call   RestoreTextStuff
       res    textWrite,(iy+sGrFlags)
       B_CALL DispOP1A
       res    fracDrawLFont,(iy+fontFlags)
       ret
 ENDIF





TextNext:


 IFDEF _S_LargeText
       db     6
 ENDIF
 IFDEF _S_SmallNum
       db     6
 ENDIF
 IFDEF _S_SmallText
       db     6
 ENDIF
 IFDEF _S_LargeNum
       db     6
 ENDIF
 IFDEF _S_LargeChar
       db     5
 ENDIF
 IFDEF _S_SmallChar
       db     5
 ENDIF      


